<%--
  Created by IntelliJ IDEA.
  User: 许正雄
  Date: 2021/12/7
  Time: 11:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台管理</title>
    <link type="text/css" rel="stylesheet" href="/static/css/style.css" />
    <script type="text/javascript" src="/static/scripts/function-manage.js"></script>
    <SCRIPT type="text/javascript" src="/static/jquery3.6.0.js"></SCRIPT>
</head>
<body>
<%@include file="/manage/head.jsp"%>
<div id="position" class="wrap">
    您现在的位置：管理后台
</div>
<div id="main" class="wrap">
    <%@include file="/manage/left.jsp"%>
<div class="main">
    <h2>修改用户</h2>
    <div class="manage">
        <form method="post" id="frm">
            <input type="hidden" name="id" value="${customer.id}"/>
            <table class="form">
                <tr>
                    <td class="field">用户名：</td>
                    <td><input type="text" class="text" name="customerName" value="${customer.customerName}" /></td>
                </tr>
                <tr>
                    <td class="field">密码：</td>
                    <td><input type="text" class="text" name="customerPwd" value="${customer.customerPwd}" /></td>
                </tr>
                <tr>
                    <td class="field">姓名：</td>
                    <td><input type="text" class="text" name="customerNickName" value="${customer.customerNickName}" /></td>
                </tr>
                <tr>
                    <td class="field">性别：</td>
                    <td><input type="text" class="text" name="customerSex" value="${customer.customerSex}" /></td>
                </tr>
                <tr>
                    <td class="field">年龄：</td>
                    <td><input type="text" class="text" name="customerAge" value="${customer.customerAge}" /></td>
                </tr>
                <tr>
                    <td class="field">手机号码：</td>
                    <td><input type="text" class="text" name="customerPhone" value="${customer.customerPhone}" /></td>
                </tr>
                <tr>
                    <td></td>
                    <td><label class="ui-blue"><button type="button" id="but">修改</button></label></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="clear"></div>
</div>
<div id="footer">
</div>
</body>
<script>
    $(function () {
        $("#but").click(function () {
            $.ajax({
                url:"../updateByCustomerId",
                type:"post",
                data:$("#frm").serialize(),
                success:function (ret) {
                    if (ret*1===1){
                        alert("修改成功！！！");
                        window.location.href="selectCustomerPage";
                    }
                }
            })
        })
    })
</script>
</html>

